package gui.g1;

import java.awt.Dimension;
import java.awt.EventQueue;
import java.awt.FlowLayout;

import javax.swing.JButton;
import javax.swing.JFrame;

public class MyGUI extends JFrame {

	public MyGUI() {
		getContentPane().
		setLayout(new FlowLayout(FlowLayout.LEFT));
		
		setTitle("Meine GUI");
		setDefaultCloseOperation(EXIT_ON_CLOSE);
		
		JButton button = new JButton("Click me!");
		JButton button2 = new JButton("Me too");
		button2.setPreferredSize(new Dimension(200, 250));
		
		getContentPane().add(button);
		getContentPane().add(button2);
		
		pack();
		setLocationRelativeTo(null);
	}

	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			@Override
			public void run() {
				JFrame f = new MyGUI();
				f.setVisible(true);
			}
		});
		// ...
	}
}
